package s06;

/**
 * @ClassName CalculatorLambdaDemo
 * @Description TODO
 * @Author Li
 * @Date 2022/8/9 16:24
 * @ModifyDate 2022/8/9 16:24
 * @Version 1.0
 */
public class CalculatorLambdaDemo {
    public static void main(String[] args) {
        invokeCalc(120, 130, (int a, int b) -> {
            return a + b;
        });
    }

    public static void invokeCalc(int a, int b, Calculator calculator) {
        int sum = calculator.calc(a, b);
        System.out.println("两个数的和是：" + sum);
    }
}
